FROM python:3.9-slim

WORKDIR /app

# Copy requirements first for better caching
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code and data
COPY app.py .
COPY data_loader.py .
COPY data/ ./data/

# Expose port 81
EXPOSE 81

# Set environment variable
ENV PORT=81

# Run the application
CMD ["python", "app.py"] 